﻿using System;
using SevenZip;

namespace __ts.Core.Package
{
    /// <summary>
    /// 
    /// </summary>
    public class PackageExtractor
    {
        public SevenZipExtractor SevenZipExtractor(string archiveFullName)
        {
            if (IntPtr.Size == 8)
            {
                SevenZipCompressor.SetLibraryPath(@"7z64.dll");
            }
            else
            {
                SevenZipCompressor.SetLibraryPath(@"7z.dll");
            }

            return new SevenZipExtractor(archiveFullName, new PackageKeyMaker().Key);
        }
    }
}
